﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;

namespace ZFY.UMC.BlazorWebAssembly.HttpServices.IdentityHttpServices
{
    public abstract class IdentityService
    {
        public readonly HttpClient _httpClient;



        public IdentityService(IHttpClientFactory httpClientFactory)
        {
            _httpClient = httpClientFactory.CreateClient("IdentityApi");
        }
    }

    public class IdentityUserService : IdentityService, IIdentityUserService
    {
        public IdentityUserService(IHttpClientFactory httpClientFactory) : base(httpClientFactory)
        {

        }

        public async Task GetApi()
        {
            Console.WriteLine(_httpClient.BaseAddress);
            var res = await _httpClient.GetAsync("WeatherForecast");
        }
    }
}
